<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'hello.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" charset="utf-8"
	src="ueditor/editor_all.js"></script>
<script type="text/javascript" charset="utf-8"
	src="ueditor/editor_config.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery-1.9.1.js"></script>
<link rel="stylesheet" type="text/css"
	href="ueditor/themes/default/ueditor.css" />
</head>

<body>
	welcome.
	<s:property value="user.username" />
	<br>
	<form method=post action="javascript:submit();">
		<textarea id="myEditor" name="myeditor">这里写你的初始化内容</textarea>
		<script type=text/javascript>
			// var editor = new UE.ui.Editor();  
			// editor.render("myEditor");  
			UE.getEditor('myEditor')
			//1.2.4以后可以使用一下代码实例化编辑器 
			//
		</script>
		<input value=提交 type=submit name=submit>

	</form>
</body>
<script type="text/javascript">
	function submit() {
		var myEditor = $("#myEditor").val();
		$.ajax({
			url : "docManage.action",
			data : {
				newsTitle : "title",
				newsReporter : "admin",
				newsContent : $("#myEditor").val()
			},
			success : function(result) {
				alert(result);
			}
		});
	}
</script>
</html>
